package com.handpay.nocardpay.baselibrary.commbase.model;


import com.handpay.nocardpay.baselibrary.commbase.model.bean.BaseErrorInfo;

import java.util.HashMap;

/**
 * Created by sxshi on 2016/12/22
 */

public interface IBaseModel<M> {
    interface OnRequestFinishedListener<T> {
        void onError(BaseErrorInfo baseErrorInfo);

        void onSuccess(T response);
    }

    /***
     * 统一网络请求，命名笼统，需要开发者根据自己的业务需求自定义网络请求接口
     * @param paramers
     * @param clzz
     * @param listener
     */
    @Deprecated
    void request(HashMap<String, Object> paramers, Class<M> clzz, OnRequestFinishedListener<M> listener);
}